package com.chcit.mobile.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.chcit.mobile.mvp.contract.TaskContract;
import com.chcit.mobile.mvp.model.TaskModel;


@Module
public class TaskModule {
    private TaskContract.View view;

    /**
     * 构建TaskModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public TaskModule(TaskContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    TaskContract.View provideTaskView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    TaskContract.Model provideTaskModel(TaskModel model) {
        return model;
    }
}